<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>一公里社区</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/iconfont.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

  </head>
  <body>
 	<div class="container-fluid food-top">
		<div class="container">
			<nav class="navbar navbar-default">
				<div class="container-fluid food-top-but">
					<div class="navbar-left">
						<a href="javascript:history.go(-1)">
							<i class="iconfont">&#xe607;</i>
							<!-- <img src="images/index_logo.png">
							<span>餐馆</span> -->
						</a>
					</div>
					<div class="navbar-middle">
						个人信息维护
					</div>
					<!-- <div class="navbar-right">
						<a href=""><i class="iconfont">&#xe604;</i></a>
					</div> -->
				</div>
			</nav>
		</div>
	</div>

	<div class="container">
		<p class="memberinfotips" id="memberinfotips"></p>
	</div>

	<form>
		<div class="container member-info">
			<div class="member-info-list">
				<div class="member-info-list-left">
					<img id="portraitPreview" class="media-object">
				</div>
				<input type="file" id="file" class="member-info-list-right change-img">
			</div>

			<div class="member-info-list member-info-list-name">
				<div class="member-info-list-left">
					<h5>昵称</h5>
				</div>
				<input type="name" id="name" class="form-control member-info-list-right" placeholder="唐家三少">
			</div>

			<div class="member-info-list member-info-list-phone">
				<div class="member-info-list-left">
					<h5>手机</h5>
				</div>
				<input type="tel" id="tel" class="form-control member-info-list-right" placeholder="13800138000" disabled>
			</div>

			<div class="member-info-list">
				<div class="member-info-list-left">
					<h5>密码</h5>
				</div>
				<input type="password" id="password" class="form-control member-info-list-right" placeholder="输入新密码">
			</div>

			<div class="member-info-list">
				<div class="member-info-list-left">
					<h5>性别</h5>
				</div>
				<select type="sex" id="sex" class="form-control member-info-list-right">
					<option>-请选择-</option>
					<option>保密</option>
					<option>男</option>
					<option>女</option>
				</select>
			</div>

			<div class="member-info-list">
				<div class="member-info-list-left">
					<h5>出生年月日</h5>
				</div>
				<input type="date" id="date" class="form-control member-info-list-right" placeholder="1900-01-01">
			</div>

			<div class="member-info-list">
				<div class="member-info-list-left">
					<h5>送货地址</h5>
				</div>
				<input type="text" id="adr" class="form-control member-info-list-right" placeholder="深圳市罗湖区港莲路20-1号">
			</div>

			<div class="member-info-list">
				<div class="member-info-list-left">
					<h5>E-MAIL</h5>
				</div>
				<input type="text" id="email" class="form-control member-info-list-right" placeholder="guest@gmail.com">
			</div>

			<a class="member-info-list btn btn-save" href="#" role="button">保存</a>
			<p class="exit"><a href="#" class="btn">登出</a></p>
		</div>
	</form>

	<div class="float-right">
		<!-- <a href="map.html" class="map-icon"><i class="iconfont">&#xe612;</i></a> -->
		<a href="#" class="suggest-icon" type="button" data-toggle="modal" data-target="#mySuggest"><i class="iconfont">&#xe60e;</i></a>

		<!-- 建议反馈 -->
		<div class="modal fade mySuggest" id="mySuggest" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close">
							<span aria-hidden="true">&times;</span>
						</button>
						<h4 class="modal-title" id="myModalLabel">意见反馈</h4>
					</div>
					<div class="modal-body">
						<!-- Single button -->
						<div class="btn-group mysuggestsort">
							<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
								建议类型 <span class="caret"></span>
							</button>
							<ul class="dropdown-menu" role="menu">
								<li><a href="#">商家</a></li>
								<li><a href="#">平台</a></li>
							</ul>
						</div>
						<textarea class="form-control" rows="3"></textarea>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
						<button type="button" class="btn btn-primary">提交</button>
					</div>
				</div>
			</div>
		</div>
	</div>

    <footer>
    	<p><a href="shop_signup.html" class="btn">商户登记</a> | <a href="signup.html" class="btn">用户注册</a></p>
    	<p>© 2015 My Company.</p>
    </footer>


    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){
		$("#file").on("change", function(){
			// Get a reference to the fileList
			var files = !!this.files ? this.files : [];
			  
			// If no files were selected, or no FileReader support, return
			if (!files.length || !window.FileReader) return;
			  
			// Only proceed if the selected file is an image
			if (/^image/.test( files[0].type)){
			  
			    // Create a new instance of the FileReader
			    var reader = new FileReader();
			  
			    // Read the local file as a DataURL
			    reader.readAsDataURL(files[0]);
			  
			    // When loaded, set image data as background of div
			    reader.onloadend = function(){
			   
					$("#portraitPreview").css("background-image", "url("+this.result+")");
					$("#portraitPreview").css("background-szie", "100%");
					}
			  
			    }
			  
			});


    	if($("#file").text = "" , $("#name").text = "" , $("#tel").text = "" , $("#date").text = "" , $("#adr").text = "" , $("#email").text = ""){
    		$("#memberinfotips").text("Hello world!");
    	}else{
    		$("#memberinfotips").text("您的信息填写不完整哦");
    	}
    })
    </script>
  </body>
</html>